package org.su.webadapter.bind;

import org.apache.commons.lang.StringUtils;

/**
 * int(原子类型)编辑器，将字符串装换为int数据
 * @author yangchuan createtime:2012-4-1上午9:08:51
 *
 */
public class AtomicIntegerEditor extends AbstractParameterEditor {
	private static final Integer ZERO_INTEGER = Integer.valueOf(0);

	@Override
	public Object parseText(String text) {
		Object result = ZERO_INTEGER;
		if (StringUtils.isNotBlank(text)) {
			result = Integer.valueOf(text);
		}
		return result;
	}
	

}
